﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Web.UI;

namespace CustomControlPractice
{
    public partial class CommonControl : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var dataSource = new List<KeyValuePair<string, string>>();
            dataSource.Add(new KeyValuePair<string, string>("Text1","Value1"));
            dataSource.Add(new KeyValuePair<string, string>("Text2", "Value2"));
            dataSource.Add(new KeyValuePair<string, string>("Text3", "Value3"));
            dataSource.Add(new KeyValuePair<string, string>("Text44444444444444444444444444444444", "Value4"));
            DropDownList1.DataSource = dataSource;
            DropDownList1.DataBind();

            StylishDropDownList1.DataSource = dataSource;
            StylishDropDownList1.DataBind();

            DropDownList2.DataSource = dataSource;
            DropDownList2.DataBind();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Debug.Assert(string.IsNullOrEmpty(DropDownList1.SelectedText));
            Debug.Assert(string.IsNullOrEmpty(DropDownList1.SelectedValue));
        }
    }
}